<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="common :: header('首页')" />
</head>
<body class="hold-transition layout-top-nav">
<div class="wrapper">

    <!-- Navbar -->
    <th:block th:include="common :: navbar" />

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <div class="content-header">
            <div class="container">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark">发送消息</h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="#">首页</a></li>
                            <li class="breadcrumb-item active">发送消息</li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content-header -->

        <!-- Main content -->
        <div class="content">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6 col-12">
                        <div class="card card-primary">
                            <!-- /.card-header -->
                            <!-- form start -->
                            <form id="send-form" role="form" action="/send">
                                <div class="card-body">
                                    <div class="form-group">
                                        <label>通道名称</label>
                                        <div class="form-group clearfix">
                                            <div class="icheck-primary d-inline">
                                                <input type="radio" id="topic1" name="topic" value="topic1" checked>
                                                <label for="topic1">topic1</label>
                                            </div>
                                            <div class="icheck-primary d-inline" style="margin-left:19px;">
                                                <input type="radio" id="topic2" name="topic" value="topic2" >
                                                <label for="topic2">topic2</label>
                                            </div>
                                            <div class="icheck-primary d-inline" style="margin-left:19px;">
                                                <input type="radio" id="topic3" name="topic" value="topic3" >
                                                <label for="topic3">topic3</label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="message">消息内容</label>
                                        <textarea id="message" name="message" class="form-control" rows="3">message</textarea>
                                    </div>
                                    <div class="form-group">
                                        <label>循环次数</label>
                                        <div class="form-group clearfix">
                                            <div class="icheck-primary d-inline">
                                                <input type="radio" id="count1" name="count" value="1" checked>
                                                <label for="topic1">1次</label>
                                            </div>
                                            <div class="icheck-primary d-inline">
                                                <input type="radio" id="count5" name="count" value="5" checked>
                                                <label for="topic1">5次</label>
                                            </div>
                                            <div class="icheck-primary d-inline" style="margin-left:19px;">
                                                <input type="radio" id="count10" name="count" value="10" >
                                                <label for="topic2">10次</label>
                                            </div>
                                            <div class="icheck-primary d-inline" style="margin-left:19px;">
                                                <input type="radio" id="count20" name="count" value="20" >
                                                <label for="topic3">20次</label>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.card-body -->

                                <div class="card-footer">
                                    <button type="button" class="btn btn-primary" onclick="send()">发送</button>
                                </div>
                            </form>
                        </div>
                    </div><!-- ./col -->
                </div><!-- ./row -->
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->

    <!-- Main Footer -->
    <th:block th:include="common :: footer" />
</div>
<!-- ./wrapper -->

<!-- REQUIRED SCRIPTS -->
<th:block th:include="common :: commonJs" />
<script th:inline="javascript">
    function send(){
        $.operate.post(ctx+"/send",$("#send-form").serializeArray());
    }
</script>
</body>
</html>
